<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--[if lt IE 9]>
      <script src="https://fastly.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://fastly.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <title>Document</title>
    <style>
        /* [class^="col"] {
            border: 1px solid red;
        } */
        
        .container .row:nth-child(1) {
            background-color: pink;
        }
        /* 列嵌套样式 */
        
        .row>div {
            height: 50px;
            background-color: pink;
        }
        /* 列偏移样式 */
        
        .row div {
            height: 50px;
            background-color: pink;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-4 col-sm-6">1</div>
            <div class="col-lg-3 col-md-4 col-sm-6">1</div>
            <div class="col-lg-3 col-md-4 col-sm-6">1</div>
            <div class="col-lg-3 col-md-4 col-sm-6">1</div>
        </div>
    </div>
    <br>
    <!-- 列嵌套 -->
    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <div class="row">
                    <div class="col-md-6">2</div>
                    <div class="col-md-6">2</div>
                </div>
            </div>
            <div class="col-md-4">1</div>
            <div class="col-md-4">1</div>
        </div>
    </div>
    <br>
    <!-- 列偏移 -->
    <div class="container">
        <div class="row">
            <div class="col-md-4">左侧</div>
            <div class="col-md-4 col-md-offset-4">右侧</div>
            <!-- 偏移的分数是12-两个盒子占的份数 -->
        </div>
        <br>
        <div class="row">
            <div class="col-md-8 col-md-offset-2">中间盒子</div>
        </div>
    </div>
    <br>
    <!-- 列排序 -->
    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-push-8">左侧</div>
            <div class="col-md-8 col-md-pull-4">右侧</div>
        </div>
    </div>
    <br>
    <!-- 响应式工具 -->
    <div class="container">
        <div class="row">
            <div class="col-xs-3 visible-lg">
                <span>我会消失</span>
            </div>
            <div class="col-xs-3">222</div>
            <div class="col-xs-3 hidden-md hidden-xs">我会变魔术</div>
            <div class="col-xs-3">444</div>
        </div>
    </div>
</body>

</html>